/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javaalgorithms;

import searching.BinarySearch;
import sorting.BubbleSort;
import sorting.InsertionSort;
import sorting.MergeSort;

/**
 *
 * @author Mellice
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
//        String[] array = new String[]{"b", "c", "a"};
//        MergeSort m = new MergeSort(array, String.class);
//        m.sort();
//        for(int i = 0; i < array.length; i++)
//            System.out.println(array[i]);
       Integer[] array = new Integer[]{3, 1, 2 };
//        BinarySearch<Integer> b = new BinarySearch<Integer>(array, Integer.class);
//        System.out.println(b.search(4));
//        String[] str = new String[]{"a", "b", "c"};
//        BinarySearch<String> b1 = new BinarySearch<String>(str, String.class);
//        System.out.println(b1.search("d"));
//        BubbleSort b = new BubbleSort<Integer>(array, Integer.class);
//        b.sort();
        InsertionSort<Integer> is = new InsertionSort<Integer>(array, Integer.class);
        is.sort();
        for(int i = 0; i < array.length; i++)
            System.out.println(array[i]);
    }
}
